<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="ReadComments.aspx.vb" Inherits="ReadComments" title="Read Comments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DataList ID="DataList1" runat="server" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Justify" ShowFooter="False" ShowHeader="False" RepeatLayout="Flow">
         <ItemTemplate>
            <div class="post">
                <h2 class="articletitle"><span><%#Eval("UserID")%> Said:</span></h2>
			    <h3 class="user">Posted On: <%#Eval("CommDate")%></h3>
                <h3 class="date">&nbsp
                    <asp:Label ID="Label2" runat="server" Text="Click Picture to Change: " Visible='<%# httpcontext.current.profile.username = "admin"%>'></asp:Label>
                    <asp:HyperLink ImageUrl='<%# "~/Images/" & Eval("Approved") &".gif" %>' ID="HyperLink2" NavigateUrl='<%# "~/ReadComments.aspx?ArticleID=" & Eval("ArticleID") & "&CommentID=" & Eval("CommentID") & "&Status=" & Eval("Approved")%>' Visible='<%# httpcontext.current.profile.username = "admin"%>' runat="server"></asp:HyperLink>
                   </h3>
                <div class="story">
                        
				        <p><%#Eval("Text")%></p>  
			        </div>
            </div>
        </ItemTemplate>
    </asp:DataList>
    &nbsp;&nbsp;
    <asp:Repeater ID="Repeater2" runat="server" DataSourceID="ObjectDataSource2">
        <ItemTemplate>
            <div class="post">
                <h2 class="articletitle"><span><%# Eval("Title")%></span></h2>
			    <h3 class="date">Posted On: <%#Eval("PostDate")%></h3>
			    <h2 class="user">Posted By: <%#Eval("UserID")%></h2>
			        <div class="story">
				        <p><%#Eval("Text")%></p>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# String.Format("~/AddComment.aspx?ArticleID={0}", Eval("ArticleID")) %>'>Add Comment</asp:HyperLink>
			        </div>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetArticleByID"
        TypeName="ArticleObj">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="0" Name="AtcleID" QueryStringField="ArticleID"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

